package marina;

public class J12Rectangle {
//Rectangle 클래스 만들기
	public static void main(String[] args) {
		Rectangle test1 = new Rectangle();
		test1.color = "Red";
		test1.width = 4;
		test1.height = 40;
		Rectangle test2 = new Rectangle();
		test2.color = "Orange";
		test2.width = 3.5;
		test2.height = 35.9;
	
		System.out.println(test1.color);
		System.out.println(test1.width);
		System.out.println(test1.height);
		System.out.println(test1.getArea());
		System.out.println(test1.getPerimeter());
		
		System.out.println(test2.color);
		System.out.println(test2.width);
		System.out.println(test2.height);
		System.out.println(test2.getArea());
		System.out.println(test2.getPerimeter());
	}
}

class Rectangle{
	double width; 
	double height;
	String color;
	
	public double getArea(){
		return width * height;
	}
	
	public double getPerimeter(){
		return (width + height) * 2;
	}
}